home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
makehelp.arc
/
MAKEHELP.DOC
< prev
next >
Wrap
Text File
|
1987-02-05
|
20KB
|
374 lines
----------------------------------------------------------------------------
MAKEHELP - System for creating context sensitive help screens in basic
----------------------------------------------------------------------------
MAKEHELP System Operations Manual
Revision 1.6 01-30-87
Written by
Software Consulting Services Inc.
920 Peacock Ave
Palm Bay, Fl 32907
----------------------------------------------------------------------------
Copyright (c) 1987, Software Consulting Services Inc.
All rights to MAKEHELP (tm) are reserved by Software Consulting Services Inc.
----------------------------------------------------------------------------
Page 1
MAKEHELP - Written by Software Consulting Services Inc......Rev 1.6 01-30-87
INTRODUCTION TO MAKEHELP SYSTEM
--------------------------------------
Have you ever wished that you could write a basic program and have those
context sensitive help screens that you see in some of the high powered
software like Lotus 1-2-3. Additionally many times I have created a program
and after I have completed the project I find that I still have to create a
manual to document the operations procedures of the program. Many a times I
have developed a program for a client, spent the long hours creating a
manual of operations for the new program and delivered both to the client.
Several months later the client will call asking a question which could
easily be answered by the "manual". I find that the manual is usually left
on a shelf and never used again.
I believe that the reason for this is partially because the programmer is
usually not very good at producing documentation that can be useful to the
operator since the programmer will sometimes "assume" many things. The
manual is not used since it is not easy to find the answers to questions
when the operator does not know how to phrase the question. I now provide
some type of help within the program. This enables the operator to press a
<function key> and find out what he/she needs to know to continue. That way
the operator does not need to look up in an index the area in question only
to find that the answer does not help in that particular operation. Or
he/she has to look in several places in the manual to see which explanation
actually refers to the particular area in the program. It is something like
having to know how to spell a word before one can look up the spelling in a
dictionary.
The MAKEHELP system is a system that will aid the basic programmer in
creating context sensitive help screens that can be called by the basic
program. These help screens are of a fixed size and shape and are popped up
on the screen. As expected, the text on the screen is temporarily saved and
later redisplayed so the program can continue as usual. A subroutine is
provided that reads the help screens onto the proper screen memory when the
<F1> key is depressed. The help screen will display until <Any key> is
pressed and then the program will resume. The programmer is required to
change a flag in the program which will indicate to the subroutine which
help screen is to be popped up. The name of this flag is HFLAG.
For instance as the program progresses the HFLAG can be set to: HFLAG=1 so
that any time between now and the next change of HFLAG if the operator
presses <F1>, HELP.001 screen will pop up. As the program continues the
programmer will change HFLAG to the appropriate number screen. Any time that
there is no help available the subroutine will call up HELP.000 which will
popup the message "NO HELP AVAILABLE HERE!". This is particularly useful in
the following respect. While the program is being written the programmer can
keep changing the HFLAG in different areas of the program. If a help screen
is not written which matches the HFLAG then the program will pop up
HELP.000. This way the programmer can create the screens later, but still
have the HFLAG designations within the program ready for future writing.
Additionally the programmer can change ambiguous or poorly written help
screens later, without changing the program itself. Only the Help screen is
changed.
Page 2
MAKEHELP - Written by Software Consulting Services Inc......Rev 1.6 01-30-87
MAKEHELP.SUB
----------------------------
The subroutine file, MAKEHELP.SUB, is an ASCII file which can be merged into
your program after the fact. Up in the front of the program a few setup
procedures are necessary:
1) Place the instructions KEY (1),"":KEY (1) ON:ON KEY (1) GOSUB 25000
** These will cause the program to branch to the help subroutine whenever
the operator pressed the <F1> function key.
2) Place the instruction MONITOR$="C" if the system that will run the
program is a CGA display adaptor.
3) Alternately the instruction MONITOR$="M" if the system that will run the
program is an IBM monochrome monitor display adaptor.
4) Throughout the program whenever there is a pause or stop for input place
the instruction HFLAG=X where X is the number of the help screen that you
want displayed at that point. Be sure to set the HFLAG before the pause
or stop for input. That way the operator will see the proper help screen.
5) It is a good idea to place an HFLAG=X at every stop/pause even if no help
has been created yet for that spot. The program will automatically pop up
HELP.000 in the event that it does not find a corresponding help screen.
That means that later when the content of the missing help screen is
better defined that help screen can be added after-the-fact.
6) HINT: The HFLAG can revert back to a previous condition if the program
requires. For instance, if a help screen was provided which described the
use of the program's menu system, the same help screen can be called at
every menu. This would be done by setting the HFLAG variable to the same
number just before every display of a menu.
7) HINT: The best control of operator input is a subroutine created that
uses the basic inkey$ instruction. This MAKEHELP.SUB requires that a loop
is taking place when the <F1> key is pressed. For example, if the program
is written using the basic INPUT instuction the scanning of the keyboard
is devoted to that instruction. Therefore honoring the depression of the
<F1> key will not take place until after the INPUT instruction has
completed. This would be inconvenient for a practical help system since
the help screen should be displayed when the operator requires the help
which is usually during input of data. The solution to to this problem is
to provide for data input in the form of an inkey$ routine which would be
a loop of instructions scanning the keyboard for input characters. This
would allow the ON KEY (1) GOSUB 25000 instruction to react to the <F1>
key as required. An example of an inkey$ input routine is as follows:
29999 'SET ZLIM TO MAX # LENGTH OF STRING, GOSUB 30000, SUBROUTINE RETURNS
STRING IN Z$
30000 ZZ$="":TL%=CSRLIN:TC%=POS(0):IF ZLIM=0 THEN ZLIM=30
30010 LOCATE TL%,TC%:PRINT"["+STRING$(ZLIM," ")+"]";
30020 Z$=INKEY$:IF Z$="" THEN 30020
30030 IF Z$=CHR$(13) THEN Z$=ZZ$:RETURN ELSE IF Z$=CHR$(8) AND LEN(ZZ$)>0
THEN ZZ$=LEFT$(ZZ$,LEN(ZZ$)-1):Z$=" ":GOTO 30060 ELSE IF Z$=CHR$(8)
AND LEN(ZZ$)=0 THEN BEEP:GOTO 30020
30040 Z%=INSTR(" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",Z$):
IF Z%=0 THEN BEEP:GOTO 30020
30050 IF LEN(ZZ$)<ZLIM THEN ZZ$=ZZ$+Z$:LOCATE TL%,TC%+LEN(ZZ$):PRINT Z$;:
GOTO 30020 ELSE BEEP:GOTO 30020
30060 LOCATE TL%,TC%+LEN(ZZ$)+1:PRINT Z$;:GOTO 30020
Page 3
MAKEHELP - Written by Software Consulting Services Inc......Rev 1.6 01-30-87
MAKEHELP.EXE
------------------------------------
MAKEHELP.EXE is a mini wordprocessor which facilitates creating a help
screen for use in the above examples. It is the "heart" of the help system.
MAKEHELP.EXE creates a window into which the programmer can type the
appropriate help message. The resulting screen can be given a number so it
can be called later by a program. If the programmer has a particular style
that is reflected in his/her operator input routines etc. then a generic
help screen can be created for a particular favorite subroutine. Then in the
future whenever that subroutine is used in a subsequent program the
appropriate help screen can be included. In that case the HFLAG is set in
the subroutine so it's use will always dictate a particular help screen. An
example might be an operator request for Yes/No might come from a favorite
subroutine that the programmer always uses for that purpose. All the
programmer must do is create the help describing how the operator should
answer Yes/No with one key stroke of "y" or "n" in upper or lower case etc.
The HFLAG would be set in the Yes/No subroutine and any time the operator
pressed <F1> when in that subroutine the generic Yes/No help screen would
pop up. Now since the generic Yes/No help screen was already created a few
projects ago, the programmer need only copy the appropriate HELP.XXX file to
the disk.
MAKEHELP.EXE is a primitive word processor and only supplies a limited
amount of necessary features. However it is versatile enough to be a
valuable tool in the creation of context sensitive help screens. When I
first set out to solve this problem I thought about merging in a text file
from another source like EDLIN, or WORDSTAR or any other favorite word
processor. I weighed out the advantages and the disadvantages and settled on
a self-contained system which did not require the ownership of a word
processor or the knowledge of it's use. Anyone who would require this
program's capability already knows enough about their computer to use this
program. That is, the use of the <Insert>, <Delete>, <Up>, <Down>, <Left>
<Right>, <Home>, <End>, <Backspace>, <Tab>, and <Enter> keys. These all work
as one might expect them to while editing a window of text. Wordwrap is not
provided at this time (but I might add this feature in the future). Only one
feature is provided for that is not inherent in the use of the cursor keys.
This feature is the CENTERING feature, which will automatically center the
current line within the help screen window for titles, etc. It's use is
described below. MAKEHELP.EXE provides a window into which the programmer
can type the appropriate text. This window does not have the usual cursor.
The position of the invisible cursor is indicated by a group of arrows that
follow this position outside the window. That is, above and below the box
two arrows follow the cursor left and right. And, on the left and right two
arrows follow the current line up and down. The intersection of the
imaginary "crosshair" between these arrows is the current position of the
invisable cursor. The current line is indicated by the two arrows at the
extreme left and right. The current column is indicated by the two arrows at
the top and bottom of the help window. It is much easier to get used to than
it is to explain in this document.
Page 4
MAKEHELP - Written by Software Consulting Services Inc......Rev 1.6 01-30-87
MAKEHELP.EXE FUNCTION KEY ASSIGNMENTS
--------------------------------------------
MAKEHELP.EXE makes use of the <Function keys> to provide the commands
required to CLEAR, TEST, EDIT, SAVE, EXIT the program, and CENTER the
current line. These functions are explained as follows:
<ESC> = CLEAR box
If this function is invoked the program will ask if "you are sure that you
want to clear the box Y/N". You can answer this question by pressing the
"Y" or the "N" key or you can indicate YES by pressing the <Enter> or
<Return> key. If you answer "N" you will be returned to where you left off
to continue editing the help screen. If you answer "Y" or <Enter> the
program will clear out the window and place underlines to indicate blank
characters. On the color graphics system the underlines will all be
connected. However, on the monochrome adapter each character is obvious
since each underline has a tiny space between it and the next underline.
There are advantages and disadvantages to each type of adapter.
<F1> = TEST a help screen
This function will allow the programmer to display a previously created help
screen as the operator would see it in the final program. No special
instuctions are required since the program will ask for the name of the help
screen requested for display. The number need not be padded with leading
zeros since the program will automatically provide them. For example, if the
help screen number typed and <Enter>'d was 34, then the program would
display the help screen HELP.034. After display any key will return you to
a blank help window so you may edit a new screen.
<F2> = EDIT a help screen
This function is provided so that you can edit a previously created help
screen. Assume that you have created a help screen some time ago, whose
layout or form you desire to duplicate. Or, assume that you have what is
considered a generic help screen that you want to customize to an
application. This function will facilitate the above requirements. You will
be asked for a help screen number. The entry of the help screen number is
the same as explained above. When the help screen is loaded it will be as
though you just typed it in at this session. You will have the ability to
edit the screen as you see fit. When you have completed your editing of the
help screen in question, you will need to save it under the same name or a
different name. This brings us to the next section on SAVE a help screen.
<F4> = SAVE help screen
This function will save the currently displayed help screen to a file with
the name HELP.XXX where XXX is the number that you want to give the help
screen. If you have called in a help screen with <F2> then the original
number will be displayed as a default number. If you do not want the
original number for this SAVE then type a new number. If the number already
exists on the disk then you will be asked if you desire to overwrite the
existing file with the new one.
<F9> = EXIT program
To EXIT the MAKEHELP program you press <F9>. Confirmation of this request is
required, afterwhich you will be returned to DOS.
<F10> = CENTER current line
Whenever it is required to center a line you can position your cursor arrows
on the line to center and press <F10>. For example one might go to the first
line of a help screen and type a title at the left margin of the box. Then
when <F10> is pressed the title that was at the left margin will be centered
on the line.
Page 5
MAKEHELP - Written by Software Consulting Services Inc......Rev 1.6 01-30-87
LIMITED LICENSE
--------------------------------
The MAKEHELP system is copyrighted but a LIMITED LICENSE is granted. You are
free to use ans share it under the following conditions:
1) MAKEHELP is not distributed in modified form.
2) MAKEHELP is distributed with this documentation file.
3) No fee or other consideration is charged for copying the files that make
up the MAKEHELP system.
4) Reference to the copyright and author is retained.
WARRANTY
--------------------------------
The MAKEHELP system is provided "as is" without warranty of any kind, either
expressed or implied, including, but not limited to the implied warranties
of merchantability and fitness for a particular purpose. The author's entire
liability will be limited to the total amount of money the individual user
paid directly and explicitly to the author for the use of the MAKEHELP
system.
REGISTRATION
--------------------------------
The MAKEHELP system is provided free of charge to anyone who wishes to use
it under the LIMITED LICENSE as described above. However, if you register
your copy of MAKEHELP with Software Consulting Services we will send you a
serialized copy of the latest version of the MAKEHELP system. You can make
copies and distribute them to as many basic programmers as you wish who
might have use for the MAKEHELP system. Whenever someone registers a copy of
your serial number with us, We will send you a check for $10.00. Make sure
that whenever you copy the MAKEHELP system that you encourage the new
programmer/user to register their copy of the MAKEHELP system. This will
insure that you get $10.00 for every copy of the MAKEHELP system that is
registered with your serial number.
In order to register this copy of the MAKEHELP system with us follow these
instuctions:
1) Send a $20.00 contribution to: SCS Inc.
920 Peacock Ave NE
Palm Bay, FL 32907
2) Include the Serial number and the revision number which is
shown in the upper right-hand corner of the MAKEHELP.EXE
screen, along with your NAME and ADDRESS. Please print the
above as if your money depended on it. IT DOES !
3) You will be sent copy of the MAKEHELP system with your serial
number in it. We will send this copy by return mail on a
Double Density, Double Sided diskette. You can then copy
from that disk as many copies of the MAKEHELP system as you
wish. REMEMBER, you will receive $10.00 for every subsequent
registration received with your serial number on it.
Thanx and enjoy,
Denny Mela
Software Consulting Services, Inc.
F
#(-27<Fé